<template>
	<view class="container">
		<!-- mo-sticky 使用示例 -->
		<mo-sticky :scrollTop="scrollTop">
			<template #header>
				<view class="header">顶部标题内容11</view>
			</template>
			<view class="h1000">内容11</view>
		</mo-sticky>
		<mo-sticky :scrollTop="scrollTop">
			<template #header>
				<view class="header">顶部标题内容22</view>
			</template>
			<view class="h1000">内容22</view>
		</mo-sticky>
	</view>
</template>

<script>
    import moSticky from '@/components/mo-sticky/mo-sticky.vue'
	export default {
		components: {
			moSticky
		},
		data() {
			return {
				scrollTop: 0
			}
		},
		onPageScroll(res) {
			this.scrollTop = res.scrollTop
		},
	}
</script>

<style lang="scss" scoped>
	.container {
		font-size: 28rpx;
		background: #f8f8f8;
	}
	.header{
		padding: 30rpx;
		background: #fff;
	}
	.h1000{
		height: 1800rpx;
	}
	
</style>
